package your.pack.sten;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class STENActivity extends Activity implements OnClickListener {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button bt_news = (Button)findViewById(R.id.bt_news);
        Button bt_teststory = (Button)findViewById(R.id.bt_teststory);
        Button bt_glossary = (Button)findViewById(R.id.bt_glossary);
        Button bt_free = (Button)findViewById(R.id.bt_free);
        
        bt_news.setOnClickListener(this);
        bt_teststory.setOnClickListener(this);
        bt_glossary.setOnClickListener(this); 
        bt_free.setOnClickListener(this);         
    }
    
	@Override
	public void onClick(View v) {
		String page ="";
		switch (v.getId()){
		case R.id.bt_news:
			page = "news";			
			break;
		case R.id.bt_teststory:
			page = "teststory";
			break;
		case R.id.bt_glossary:
			page = "glossary";
			break;
		case R.id.bt_free:
			page = "free";
			break;
		}
		Intent intent = new Intent(this, ClickedPage.class);
		intent.putExtra("selectedPage", page);
		startActivity(intent);
	}
}

/*
@Override
public boolean onKeyDown(int keyCode, KeyEvent event){
	if((keyCode == KeyEvent.KEYCODE_BACK)&&wv.canGoBack()){
		wv.goBack();
		return true;
	}
	return super.onKeyDown(keyCode, event);
}
*/